// @Time : 2024/3/16 23:46
// @Author : cute
// @Email : Aggressive_cute@126.com
function J(t) {
    for (var e = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"], n = "", r = 0; r < t; r++) {
        n += e[Math.floor(35 * Math.random())]
    }
    return n
}

function H(t, e) {
    for (var n = t.toString().length; n < e;)
        t = "0" + t,
            n++;
    return t
}

function v(t) {
    var e, n, r, o, i, a, s, c, u, f,
        l = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1];
    if (s = t.length,
        t = (t += Array(5 - s % 4).join("=")).replace(/\-/g, "+").replace(/\_/g, "/"),
        /[^ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\+\/\=]/.test(t))
        return "";
    for (u = s,
         (c = "=" == t.charAt(s - 2) ? 1 : "=" == t.charAt(s - 1) ? 2 : 0) > 0 && (u -= 4),
             u = 3 * (u >> 2) + c,
             f = new Array(u),
             i = a = 0; i < s && -1 != (e = l[t.charCodeAt(i++)]) && -1 != (n = l[t.charCodeAt(i++)]) && (f[a++] = String.fromCharCode(e << 2 | (48 & n) >> 4),
    -1 != (r = l[t.charCodeAt(i++)])) && (f[a++] = String.fromCharCode((15 & n) << 4 | (60 & r) >> 2),
    -1 != (o = l[t.charCodeAt(i++)]));)
        f[a++] = String.fromCharCode((3 & r) << 6 | o);
    return f.join("")
}

function g() {
    return 1111471640 + parseInt(v("MTU0Mjk2NDEyOQ"))
}

function y(t, e, n, r, o, i) {
    var a = function (t, e) {
        return t ^ e
    }
        , s = function (t, e) {
        return t + e
    }
        , c = function (t, e) {
        return t << e
    }
        , u = function (t, e) {
        return t >>> e
    };
    return a(s(a(n >>> 5, c(e, 2)), a(u(e, 3), c(n, 4))), (t ^ e) + (i[a(3 & r, o)] ^ n))
}

function h(t) {
    return 4294967295 & t
}

function m(t, e, n, r, o, i, a) {
    var s = a - 25700;
    if (s >>> 16 == 1) {
        var c = s >>> 12 & 7
            , u = s >>> 8 & 7
            , f = s >>> 4 & 7
            , l = 7 & s;
        return y(t, e, n, r, o, i) ^ (e >>> c ^ n << u) + (t >>> f & 63 ^ n + e >>> (7 - l >>> 1) & 63)
    }
    return y(t, e, n, r, o, i)
}

function b(t, e) { // ok
    var n, r = t.length, o = r >> 2;
    0 != (3 & r) && ++o,
        e ? (n = new Array(o + 1))[o] = r : n = new Array(o);
    for (var i = 0; i < r; ++i)
        n[i >> 2] |= t.charCodeAt(i) << ((3 & i) << 3);
    return n
}

function p(t, e, n) {
    var r, o, i, a, s, c, u = t.length, f = u - 1;
    for (o = t[f],
             i = 0,
             c = 0 | Math.floor(6 + 52 / u); c > 0; --c) {
        for (a = (i = h(i + g())) >>> 2 & 3,
                 s = 0; s < f; ++s)
            r = t[s + 1],
                o = t[s] = h(t[s] + m(i, r, o, s, a, e, n));
        r = t[0],
            o = t[f] = h(t[f] + m(i, r, o, f, a, e, n))
    }
    return t
}

function w(t) {
    return t.length < 4 && (t.length = 4),
        t
}

function l(t) {
    if (/^[\x00-\x7f]*$captcha/.test(t))
        return t;
    for (var e = [], n = t.length, r = 0, o = 0; r < n; ++r,
        ++o) {
        var i = t.charCodeAt(r);
        if (i < 128)
            e[o] = t.charAt(r);
        else if (i < 2048)
            e[o] = String.fromCharCode(192 | i >> 6, 128 | 63 & i);
        else {
            if (!(i < 55296 || i > 57343)) {
                if (r + 1 < n) {
                    var a = t.charCodeAt(r + 1);
                    if (i < 56320 && a >= 56320 && a <= 57343) {
                        var s = 65536 + ((1023 & i) << 10 | 1023 & a);
                        e[o] = String.fromCharCode(240 | s >> 18 & 63, 128 | s >> 12 & 63, 128 | s >> 6 & 63, 128 | 63 & s),
                            ++r;
                        continue
                    }
                }
                throw new Error("Malformed string")
            }
            e[o] = String.fromCharCode(224 | i >> 12, 128 | i >> 6 & 63, 128 | 63 & i)
        }
    }
    return e.join("")
}

function d(t, e) {
    var n = t.length
        , r = n << 2;
    if (e) {
        var o = t[n - 1];
        if (o < (r -= 4) - 3 || o > r)
            return null;
        r = o
    }
    for (var i = 0; i < n; i++)
        t[i] = String.fromCharCode(255 & t[i], t[i] >>> 8 & 255, t[i] >>> 16 & 255, t[i] >>> 24 & 255);
    var a = t.join("");
    return e ? a.substring(0, r) : a
}

function f(t, e, n) {
    return null == t || 0 === t.length ? t : (t = l(t),
        e = l(e),
        d(p(b(t, !0), w(b(e, !1)), n), !1))
}

// 算法一致
function u(t) {
    var e, n, r, o, i, a, s, c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split("");
    for (n = r = 0,
             o = t.length,
             a = (o -= i = o % 3) / 3 << 2,
         i > 0 && (a += 4),
             e = new Array(a); n < o;)
        s = t.charCodeAt(n++) << 16 | t.charCodeAt(n++) << 8 | t.charCodeAt(n++),
            e[r++] = c[s >> 18] + c[s >> 12 & 63] + c[s >> 6 & 63] + c[63 & s];
    return 1 == i ? (s = t.charCodeAt(n++),
        e[r++] = c[s >> 2] + c[(3 & s) << 4]) : 2 == i && (s = t.charCodeAt(n++) << 8 | t.charCodeAt(n++),
        e[r++] = c[s >> 10] + c[s >> 4 & 63] + c[(15 & s) << 2]),
        e.join("")
}

function c(t, e) {
    return u(f(t, e, i))
}

function X(t, e, n) {
    var r = t
        , a = "E736B80A35290F193C2034A8021CC63B"; // 固定
    e && (i = e);
    try {
        return n ? JSON.stringify(window.f.getEncryptData(r, n)) : c(r, a)
    } catch (t) {
        return c(r, a)
    }
}


function getEncryptObj(r, s, track) {
    var i = 99992; // 固定
// let r = 'IhxPagACAAAAAEXZbT0AMK5Bc1K2Uk2Q9IeseYxU_XFRrl8Hk8vyE4mbpEN2ghVX7Kn6rOAhMlMKWE504ERkZQAAAAA'; //变化si sessionId
    let ddd = Date.parse(new Date + ""), p22 = ddd % 41 // 变化
// 变化 t 轨迹！ ht和wt
    let t =track;
// 变化 devcInfo 我的指纹
    let gg = '{"capfp":"8U7cTuJyS3S8ACQIMhpR_Klwj7WXpYbe0L5ahaNCGDEc7x8-t8k8-NA-ju3ECBAZVGJOX2RaJR8eFkbhP6RIIQ==","cvs":"36f407b76dc61c2dc4bf0558c98e0249","wgl":"8beda49eca8bcb8563f0016b2cf5a17d","pr":"1.25","cd":"24","fv":"","fts":"Arial,Calibri,Cambria,Consolas,Courier,CourierNew,Georgia,Helvetica,Impact,LucidaConsole,LucidaSansUnicode,MSGothic,MSPGothic,PalatinoLinotype,SegoePrint,SegoeScript,SegoeUI,Tahoma,Times,TimesNewRoman,TrebuchetMS,Verdana,Wingdings,Symbol,Candara,Constantia,Corbel,Ebrima,FangSong,Gabriola,MicrosoftYaHei,MicrosoftYiBaiti,MingLiUExtB,PMingLiUExtB,SimHei,SimSun,SimSunExtB","scr":"1536x864,1536x824","cpu":"12","pt":"Win32","tzo":"Asia/Shanghai","lan":"zh-CN","wvr":"Google Inc. (Intel)~ANGLE (Intel, Intel(R) UHD Graphics 630 (0x00003E9B) Direct3D11 vs_5_0 ps_5_0, D3D11)","wdr":false,"mem":8,"sdv":"2.0","lns":"zh-CN,zh","tsp":"0"}'
    let touchObj = {
        "touchList": [
            {
                "eid": "click",
                "did": "slider-div",
                "cn": "move-img",
                "sx": 806,
                "sy": 361,
                "px": 806,
                "py": 274,
                "time": 1710614673563
            },
            {
                "eid": "click",
                "did": "slider-div",
                "cn": "move-img",
                "sx": 748,
                "sy": 380,
                "px": 748,
                "py": 293,
                "time": 1710614696161
            },
            {
                "eid": "click",
                "did": "",
                "cn": "captcha_drop",
                "sx": 811,
                "sy": 112,
                "px": 811,
                "py": 25,
                "time": 1710617234860
            },
            {
                "eid": "click",
                "did": "",
                "cn": "empty_button empty_disable",
                "sx": 763,
                "sy": 484,
                "px": 763,
                "py": 397,
                "time": 1710617238570
            },
            {
                "eid": "click",
                "did": "slider-div",
                "cn": "move-img",
                "sx": 855,
                "sy": 360,
                "px": 855,
                "py": 273,
                "time": 1710690800791
            },
            {
                "eid": "click",
                "did": "",
                "cn": "move-img",
                "sx": 724,
                "sy": 311,
                "px": 724,
                "py": 224,
                "time": 1710851606343
            },
            {
                "eid": "click",
                "did": "",
                "cn": "captcha_footer",
                "sx": 615,
                "sy": 364,
                "px": 615,
                "py": 277,
                "time": 1710851657554
            },
            {
                "eid": "click",
                "did": "",
                "cn": "move-img",
                "sx": 756,
                "sy": 345,
                "px": 756,
                "py": 258,
                "time": 1710851748946
            },
            {
                "eid": "click",
                "did": "",
                "cn": "move-img",
                "sx": 749,
                "sy": 318,
                "px": 749,
                "py": 231,
                "time": 1710851791164
            },
            {
                "eid": "click",
                "did": "slider-div",
                "cn": "move-img",
                "sx": 712,
                "sy": 324,
                "px": 712,
                "py": 237,
                "time": 1710851970655
            }
        ]
    }
// 轨迹
    let l = '';
    let tk = X(ddd + H(r.length, 4) + r + H(s.length, 4) + s + H(t.length, 6) + t + JSON.stringify(touchObj) + J(p22), i, l)
    let ct = X(J(ddd % 19) + H(r.length, 4) + r + gg + ddd, i, l)
    resObj = {
        tk: tk,
        ct: ct,
    }
    return resObj;
}

